<%@page contentType="text/plain" pageEncoding="UTF-8" import="com.mop.dinnerbook.dao.*,java.util.*,com.mop.dinnerbook.bean.*"%>
<div id="registerHeader">
<a id="joinClose" href="javascript:void(0)" onclick="closeJoin()">关闭</a>
<br/>
</div>
<div id="registerContent">
<br/>
<span>项目组：</span>
<select id = "joinProject">
<%
	ProjectDAO pdao = new ProjectDAO();	
	Iterator piter = pdao.getAllProject().iterator();
	while(piter.hasNext()){
		Project project = (Project) piter.next();
                Integer pid = (Integer)session.getAttribute("pid");
                if(pid !=null && pid.intValue() == project.getPid())
                    out.write("<option selected value=" + project.getPid() +">"+ project.getPname() +"</option>");
                else
                    out.write("<option value=" + project.getPid() +">"+ project.getPname() +"</option>");            
	}
%>
</select>
<br/>
<span>选岗位：</span>
<select id = "joinDepartment">
<%
	DepartmentDAO ddao = new DepartmentDAO();	
	Iterator diter = ddao.getAllDepartment().iterator();
	while(diter.hasNext()){
		Department depart = (Department) diter.next();
                Integer pid = (Integer)session.getAttribute("pid");
                out.write("<option value=" + depart.getDid() +">"+ depart.getDname() +"&nbsp;&nbsp;</option>");            
	}
%>
</select>
<br/>
<span>员工姓名：</span><input type="text" id = "joinName" size = 8/>
<br/>
<span>楼层：</span>
<select id="joinfid">
<%
FloorDAO fdao = new FloorDAO();
List floorList = fdao.getFloorList();
Iterator fiter = floorList.iterator();
while(fiter.hasNext()){
    Floor floor = (Floor)fiter.next();
    out.write("<option selected value="+ floor.getFid() +">"+ floor.getFname() +"</option>");
}
%>
</select>
<br/><br/>
<input type="button" value ="加入" onclick="joinNow()" />
<br/>
<br/>
</div>
<div id="joinStatus">
    
</div>

